package com.qfedu.wfx1.mq;

import io.goeasy.GoEasy;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class VIPMessageListenter {
    @JmsListener(destination = "merchant")
    public void listen(String msg){
        System.out.println("接收：" + msg);

        //-----------------goeasy推送消息给页面，进行页面刷新-------------------
        GoEasy goEasy = new GoEasy("http://rest-hangzhou.goeasy.io", "BC-68b41d3031624912b43cd30ef3854110");
        //参数1：发送消息的频道.zhangsan 表示消息只发给张三
        goEasy.publish("merchant", "success");
    }
}
